Org-mode all the thingz!

Nick Anderson

Created: 2019-08-01 Thu 16:27

org-mode

What is it?

  • around since 2003
  • markup language
  • best supported in emacs
  • system for managing plain text
  • a second brain or exocortex

An aside for non emacs users

What is it for?

  • task manager/planner
  • authoring/outlining documents
  • keeping notes, maintaining todo lists, planning projects

Things I do, what interests you?

Worklog/Literate *Ops

org-capture

  • Capture something you need without breaking your flow

org-capture supports sub menus

templates improve speed and consistency

Example meeting template

    ;; BEGIN Capture Templates
    ;; I picked up this neat trick from the Venerable Sacha Chua
    (defvar my/org-meeting-template-planning "* %u Meeting About CFEngine Planning   %^G
CREATED: %U

*Agenda:*
 - Demos
 - Review work in progress
 - Review newly registered issues
 - [[https://tracker.mender.io/secure/RapidBoard.jspa?rapidView=26][CFEngine Kanban board]]

** Demos
** WIP
** New Issues


" "Meeting Template - Planning")

Configuring capture templates

;; Configure custom capture templates
(setq org-capture-templates
      `(;; Note the backtick here, it's required so that the defvar based tempaltes will work!
        ;;http://comments.gmane.org/gmane.emacs.orgmode/106890

        ;; I have lot's of meetings, so lets have a submenu
        ("m" "Meetings" )
        ("mp" "Meeting - Planning/Review" entry (file "~/org/Work/northern.tech/development-meetings.org" )
         ,my/org-meeting-template-planning :clock-in t :clock-resume t :append t :empty-lines-after 1)
        ))

Time Tracking

  • org-clock-in, org-clock-out, org-clock-goto, org-clock-report, org-clock-resolve-clocks

Clocking in and out of tasks

Clock Reports

Jira

Screenshot/Cast

org-download
org-download-screenshot, drag and drop,
camcorder
start and stop screen recording, convert to gif

Notes

Deft

  • For one file per note organization (kind of like Evernote)

Code blocks

CFEngine

#+NAME:CFEngine-hello-world
#+BEGIN_SRC cfengine3 :include-stdlib t :log-level info :exports both :run-with-main t
  reports: 'CFEngine says "Hello, World!"'; 
#+END_SRC

#+RESULTS: CFEngine-hello-world
: R: CFEngine says "Hello, World!"

Python

#+BEGIN_SRC python :results output
  print("Python says \"Hello, World!\"") 
#+END_SRC

#+RESULTS:
: Python says "Hello, World!"

Shell

#+BEGIN_SRC sh :results output
  echo "$SHELL says \"Hello, World!\"" 
#+END_SRC

#+RESULTS:
: /usr/bin/zsh says "Hello, World!"

Reusing results

#+BEGIN_SRC sh :results output :var INPUT=CFEngine-hello-world
  echo "$INPUT" 
#+END_SRC

#+RESULTS:
: R: CFEngine says "Hello, World!"
: 

Remote execution

#+CAPTION: SQL in org-mode SRC block
#+BEGIN_SRC sql :exports both :dir /ssh:user@remote: :engine postgresql :database cfdb
  SELECT firstreporttimestamp from __hosts limit 1
#+END_SRC

#+RESULTS:
| firstreporttimestamp         |
|------------------------------|
| 2019-02-15 19:49:57.74915+00 |

Diagrams

PlantUML Source

Exporting

HTML Theme Readtheorg

HTML Theme BigBlow

PDF

Email

mu4e

Keeping Secrets

  • Tag entries with crypt to automatically encrypt sections of a file with GPG
  • org-decrypt-entry

For my eyes only

–—BEGIN PGP MESSAGE–—

hQIMA/jYNcPWXvJ6ARAAygauqE6m4hK1h2LX/P43L1kXoaVyIdpge9RKFbejEDho SokDEGtdshtUatiQmcqMiTDhnL+1B6gjMMXhdG5J0VmigXghY8+NyYN9ndKfDi09 Vd68XxP36X/EKDS4oH+0CrtiWR4UojX9GW7xA6wdIRP7spR3Lc4bRNcIxbLhNr59 JDAM2u5yQE4rRhlwjbzUNF5QGrmY1UKL3gOklfGBZdpIs7EI14n24WBQJTP4cmi0 nAKY3NzvUyj4r+BF2g1Bx21lusuwPH3NXSkgjmHK4yZrGNyQXr1Xnv30pHls5Zvr j8IFAxpQ6sSw9CEI11uAhBx/CZUYSosHy36njUOsoLU8Muu0r6GruU8zDPmo47Qj q4tq3GVi/BgFds+vSMMHyom8gmTLK82WuETF/CPIkrdIIkpt9zTCRTzkeRF1U9LE 33PHKWsPji3wAjt0KrSArnRTGDI9qEJDU0rtouT1d5GIN8nzUJw8Np/GTPQ/SNR9 nyxPhevEzCCXGxBDf6cYjQpqMJuqGUmHhq8MzhuyAAXVOB5L0eirdPE+bczWNHrM xcVZr7Ofb6bJQYWy2FG0VWz28wFnhw75v9fEdPpyDAhMsn9TU/g15Shh72Hy+MGM G4X3iC5fdmnXjOz3Ig3cNIMFTyIgNL0RMUZEyoXJ4AC8KrulQnAPgxFORvHjmRzS UAF4y/iDJia45wGWIC+6J+seIRKx65ZX2gtCc/LFCGx1LEYuPqFTTkwa+Pw52DVa 9P1MogqpjoOuCKjEqXKwqGBexsLkxSgQXbDUnuNcvTaE =Lxf/ –—END PGP MESSAGE–—

Blogging

Journaling

org-journal

Stored one file per day

ls ~/org/journal | grep -P "2019-0[345]" | head -n 5
2019-03-03
2019-03-06
2019-03-11
2019-03-12
2019-03-14

org-datetree, org-reverse-datetree

  • Many entries in one file

Presentations

Tables/Spreadsheets

Table 1: @>$2=vmin(@2..@-1)::@>$3=vmax(@2..@-1)::@>$4=vmean(@2..@-1)::@>$5=vsum(@2..@-1)
Item Low Value High Value Mean Sum
Hammer 1 100 10 11
More 3 200 11 8
Axe 20 25 30 13
Total: 1 200 17 32
  • Each formula is separated with ::
  • @ indicates the ROW (@> means last row)
  • $ indicates the COLUMN

Live action

Referencing cells by name

Table 2: $l=vmin(@2..@-1)::$h=vmax(@2..@-1)::$m=vmean(@2..@-1)::$s=vsum(@2..@-1)
Item Low Value High Value Mean Sum
Hammer 10 20 10 10
Axe 20 25 30 13
^Total: 10 25 20 23
^ l h m s
  • ^ indicates field values on this line define names for the field ABOVE this row

Task Management/Calendaring

Keep agenda top of mind

Going Mobile

Android iOS
Orgzly MobileOrg
Organic beorg
MobileOrg  
SyncOrg  

Orgzly

Created by Nick Anderson.